stylecontext: add style classes for top/bottom/right/left areas
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 22 Sep 2011 00:13:49 +0000 (20:13 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 27 Sep 2011 17:43:21 +0000 (13:43 -0400)
This is useful to e.g. theme notebook tabs differently according to
their position directly from the CSS sheet.

GtkNotebook support in a separate commit.

https://bugzilla.gnome.org/show_bug.cgi?id=659777

docs/reference/gtk/gtk3-sections.txt
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h

index 6ee269d954d3ecde077226e8df222fa8318ac088..3fdfeed9d7fb13902e79eaf5bc588aade69f8546 100644 (file)
@@ -5652,6 +5652,10 @@ GTK_STYLE_CLASS_VIEW
 GTK_STYLE_CLASS_WARNING
 GTK_STYLE_CLASS_HORIZONTAL
 GTK_STYLE_CLASS_VERTICAL
+GTK_STYLE_CLASS_TOP
+GTK_STYLE_CLASS_BOTTOM
+GTK_STYLE_CLASS_LEFT
+GTK_STYLE_CLASS_RIGHT
 GTK_STYLE_REGION_COLUMN
 GTK_STYLE_REGION_COLUMN_HEADER
 GTK_STYLE_REGION_ROW
index f5f90093b6e81baff7c7e9b7d2b7a5522628a368..97e9f307f2cc0bdf53df7a2b763323438885134c 100644 (file)
  * #GTK_STYLE_CLASS_QUESTION,
  * #GTK_STYLE_CLASS_ERROR,
  * #GTK_STYLE_CLASS_HORIZONTAL,
- * #GTK_STYLE_CLASS_VERTICAL.
+ * #GTK_STYLE_CLASS_VERTICAL,
+ * #GTK_STYLE_CLASS_TOP,
+ * #GTK_STYLE_CLASS_BOTTOM,
+ * #GTK_STYLE_CLASS_LEFT,
+ * #GTK_STYLE_CLASS_RIGHT,
  * </para>
  * <para>
  * Widgets can also add regions with flags to their context.
index 3e32c683cb8e340ee9fa0d1574289f7483e6f391..33cf5560faf4e73ca7cdb0f167a28aff09513496 100644 (file)
@@ -600,6 +600,45 @@ struct _GtkStyleContextClass
  */
 #define GTK_STYLE_CLASS_VERTICAL "vertical"
 
+/**
+ * GTK_STYLE_CLASS_TOP:
+ *
+ * A CSS class to indicate an area at the top of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_TOP "top"
+
+/**
+ * GTK_STYLE_CLASS_BOTTOM:
+ *
+ * A CSS class to indicate an area at the bottom of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_BOTTOM "bottom"
+
+/**
+ * GTK_STYLE_CLASS_LEFT:
+ *
+ * A CSS class to indicate an area at the left of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_LEFT "left"
+
+/**
+ * GTK_STYLE_CLASS_RIGHT:
+ *
+ * A CSS class to indicate an area at the right of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_RIGHT "right"
 
 /* Predefined set of widget regions */